<script setup lang="ts">
interface Props {
  title?: string;
  width?: number | string;
}

withDefaults(defineProps<Props>(), {
  title: '详情',
  width: 600
});

const visible = defineModel<boolean>('modelValue', {
  default: false
});

function handleClose() {
  visible.value = false;
}
</script>

<template>
  <ADrawer v-model:open="visible" :title="title" :width="width" placement="right" @close="handleClose">
    <slot />
  </ADrawer>
</template>

<style scoped></style>
